home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11394 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How do you reset the computer using C on a PC ?
  5. Date: 24 Mar 1996 08:16:00 +1200
  6. Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
  7. Distribution: world
  8. Message-ID: <4j1m60$8l5@airdmhor.gen.nz>
  9. References: <31473FD4.48AA@ccis.com> <Pine.A32.3.91.960313183048.180818A-100000@red.weeg.uiowa.edu> <4ibj64$u2@hermes.is.co.za>
  10. NNTP-Posting-Host: airdmhor.gen.nz
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Jan Kaluza:
  14. > More seriously: when you want to reset the PC, call this function:
  15.  
  16. > void resetPC(void) {
  17. >   struct REGPACK rr;
  18. >   intr(25,&rr);
  19. > }
  20.  
  21. > This works for Turbo C/Borland C. For other compilers there must be an 
  22. > equivalent.  Interrupt 25 resets the PC in DOS. I found it hangs up a
  23. > DOS session in Windows rather nastily. 
  24.  
  25.   Don't call int 25, it's the _WRONG_ thing to do.  It doesn't reset all
  26. machines blah blah blah blah blah.... <grunt> I've said it so many times
  27. before.. I can't be bothered.
  28.